{selectedPub !== "looseleaf" && selectedPub && (
)}
{
if (!selectedPub) return;
e.preventDefault();
if (selectedPub === "create") return;
// For looseleaf, navigate without publication_uri
if (selectedPub === "looseleaf") {
router.push(
`${permission_token.id}/publish?title=${encodeURIComponent(title)}&description=${encodeURIComponent(description)}&entitiesToDelete=${encodeURIComponent(JSON.stringify(entitiesToDelete))}`,
);
} else {
router.push(
`${permission_token.id}/publish?publication_uri=${encodeURIComponent(selectedPub)}&title=${encodeURIComponent(title)}&description=${encodeURIComponent(description)}&entitiesToDelete=${encodeURIComponent(JSON.stringify(entitiesToDelete))}`,
);
}
}}
>
Next{selectedPub === "create" && ": Create Pub!"}
)}